#include <boost/lambda/lambda.hpp>
#include <gsl/gsl_sf_bessel.h>
#include <iostream>
#include <iterator>
#include <algorithm>

#include <cmath>
#include <stdio.h>
#include <stdlib.h>
#include <limits>       // std::numeric_limits

int main()
{
    double x = 5.0;
    double inf = -std::numeric_limits<double>::infinity();
    double nan = std::numeric_limits<double>::quiet_NaN();
    std::cout << "exp(-inf)=" << exp(inf) << " exp(nan)=" << exp(nan) << " nan+1=" << nan+1 << std::endl;

    using namespace boost::lambda;
    typedef std::istream_iterator<int> in;

    double y = gsl_sf_bessel_J0(x);
    std::cout << "J0(5)=" << y << std::endl;

    std::for_each(
        in(std::cin), in(), std::cout << (_1 * 3) << " " );
}

